import java.util.Scanner;

public class SwapNumbers {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.print("请输入第一个整数：");
        int num1 = scanner.nextInt();

        System.out.print("请输入第二个整数：");
        int num2 = scanner.nextInt();

        System.out.println("\n交换前：");
        System.out.println("第一个整数：" + num1);
        System.out.println("第二个整数：" + num2);

        // 交换两个变量的值
        int temp = num1;
        num1 = num2;
        num2 = temp;

        System.out.println("\n交换后：");
        System.out.println("第一个整数：" + num1);
        System.out.println("第二个整数：" + num2);

        scanner.close();
    }
}
